<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>订单管理-订单列表</title>
    <!--bootstrap-select  css文件-->
    <link rel="stylesheet" type="text/css" href="js/bootstrapselect/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="js/bootstrapselect/css/bootstrap-select.css"/>
    <!--弹窗 css文件-->
    <link rel="stylesheet" type="text/css" href="js/layer/layer.css">
    <!--日期  css文件-->
    <link rel="stylesheet" type="text/css" href="js/datepicker/css/bootstrap-datepicker.css">
    <!--图片点击放大  css文件-->
    <link rel="stylesheet" href="js/viewer/css/viewer.min.css">
    <!--主要css样式-->
    <link rel="stylesheet" type="text/css" href="css/models.css">
</head>
<body>
<div class="MainContent">
    <!--主体内容-->
    <div class="MainCont">
        <div class="ph_snbBtn">
            <button class="columnBtn" name="" value="刷新">刷新</button>
            <button class="columnBtn" name="" value="导出">导出</button>
        </div>
        <!--筛选条件-->
        <div class="ph_screen">
            <table class="ph_tableBox">
                <tr>
                    <th>下单时间：</th>
                    <td colspan="2"><p class="dayBox"><input class="start_rise date start" name="" type="text">&nbsp;-&nbsp;<input class="start_rise date end" name="" type="text"></p></td>
                    <th>门店名称：</th>
                    <td><input name="" type="text"></td>
                    <th>订单编号：</th>
                    <td><input name="" type="text"></td>

                </tr>
                <tr>
                    <th>订单状态：</th>
                    <td>
                        <select class="selectpicker">
                            <option value="">全部</option>
                            <option value="">冻结</option>
                            <option value="">正常</option>
                        </select>
                    </td>
                    <td colspan="6">
                        <input name="" type="button" value="搜索"><input name="" type="button" value="重置">
                    </td>
                </tr>
            </table>
        </div>
        <!--end 筛选条件-->
        <!--商品列表-->
        <div class="ph_wareBox ph_tabScroll">
            <table class="ph_wareList" id="example"></table>
        </div>
        <!--end 商品列表-->
    </div>
    <!--end 主体内容-->
</div>
<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<!--bootstrap-select-->
<script type="text/javascript" src="js/bootstrapselect/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrapselect/bootstrap-select.js"></script>
<script type="text/javascript" src="js/bootstrapselect/select.js"></script>
<!--日期控件-->
<script type="text/javascript" src="js/datepicker/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="js/datepicker/jquery.timepicker.js"></script>
<script type="text/javascript" src="js/datepicker/jquery.datepair.js"></script>
<script type="text/javascript" src="js/datepicker/datepicker.js"></script>
<!--分页-->
<script type="text/javascript" src="js/pages/jquery.dataTables.min.js"></script>
<!--弹窗-->
<script type="text/javascript" src="js/layer/layer.js"></script>
<!--图片点击放大-->
<script src="js/viewer/viewer-jquery.min.js"></script>
<script type="text/javascript">
    $(function () {
        $('#example').on('dblclick', 'tbody tr', function () {
            var index = layer.open({
                type: 2,
                title: '详情',
                closeBtn: 1,
                area: ['100%','100%'],
                //maxmin: true,
                shade: 0,
                btn: ['返回'],
                btnAlign: 'c',
                content: 'jxf_order_agentdetails.html'
            });
            layer.full(index);
        });
        //接单
        $('.ph_wareList').on('click','.js_Frozen',function(){
            layer.confirm('确定此操作吗？',{
                title: '接单',
                icon: 2,
                btnAlign: 'c',
                closeBtn : 0
            },function(index){
                layer.alert('操作失败', {icon: 2,btnAlign: 'c', closeBtn : 0});
                //layer.close(index);
            });
        });
        //发货
        $('.ph_wareList').on('click','.Js_Enable',function(){
            layer.confirm('确定此操作吗？',{
                title: '发货',
                icon: 1,
                btnAlign: 'c',
                closeBtn : 0
            });
        });
        //详情
        $('.ph_wareList').on('click','.js_orderdetail',function(){
            var index = layer.open({
                type: 2,
                title: '详情',
                closeBtn: 1,
                area: ['100%','100%'],
                //maxmin: true,
                shade: 0,
                btn: ['返回'],
                btnAlign: 'c',
                content: 'jxf_order_agentdetails.html'
            });
            layer.full(index);
        });
        $('#example').DataTable({
            "bServerSide": true,
            "sPaginationType": "full_numbers",
            //"bJQueryUI": true,
            "sDom": '<"">t<"F"ip>',
            "autoWidth": false,  //自适应宽度
            //"sAjaxSource": "${ctx}/api/user/list", //ajax调用接口
            //<div class="btn-group" style="text-align:left;"><button type="button" class="btn btn-info dropdown-toggle"data-toggle="dropdown">操作 <span class="caret"></span></button>
            "sAjaxSource": "data/arrays.txt", //ajax调用接口
            "aoColumnDefs": [{sDefaultContent: '', orderable: false, aTargets: ['_all']}],
            "aoColumns": [
                {"sWidth": "50px", "sTitle": "编号", "mData": "id"},
                {"sTitle": "订单编号", "mData": "id3"},
                {"sTitle": "门店名称", "mData": "id3"},
                {"sTitle": "下单时间", "mData": "id10"},
                {"sTitle": "实际总额", "mData": "id3"},
                {"sTitle": "订金", "mData": "id5"},
                {"sTitle": "尾款", "mData": "id10"},
                {
                    "sWidth": "90px", "sTitle": "订单状态", "mData": "id9", "mRender": function () {
                    //return '<span class="gray">已结算</span>';//gray 灰色
                    return '<span>交易成功</span>';  //默认颜色就不用加样式名
                }
                },
                {
                    "sWidth": "110px",
                    "sTitle": "操作",
                    "mData": "id",
                    "sClass": "ph_tableShow",
                    "mRender": function (data, type, full) {
                        var text = '<div class="operateBox"><input class="operate" name="" type="button" value="操作选项">';
                        text += '<ul class="operateList hide" role="menu">';
                        text += '<li><a class="js_Frozen" href="javascript:void(0);">接单</a></li>';
                        text += '<li><a class="Js_Enable" href="javascript:void(0);">发货</a></li>';
                        text += '<li><a class="js_Frozen" href="javascript:void(0);">取消</a></li>';
                        text += '<li><a class="js_orderdetail" href="javascript:void(0);">详情</a></li>';
                        text += '</ul></div>';
                        return text;
                    }
                }
            ],
            "oLanguage": {
                "sProcessing": "数据加载中······",
                "sLengthMenu": "显示 _MENU_ 条记录",
                "sZeroRecords": "没有您要搜索的内容！",
                "sEmptyTable": "列表中无数据存在！",
                "sInfo": "当前显示 _START_ 到 _END_ 条数据，共 _TOTAL_ 条数据",
                "sInfoEmpty": "显示 0 到 0 条记录",
                "sInfoFiltered": "数据列表中共  _MAX_ 条记录",
                "oPaginate": {
                    "sFirst": "首页",
                    "sPrevious": "上一页",
                    "sNext": "下一页",
                    "sLast": "末页"
                }
            }
            /*"fnServerData" : function ( sSource, aoData, fnCallback, oSettings ) {
               oSettings.jqXHR = $.ajax( {
                   "dataType" 	: 'json',
                   "type" 		: "GET",
                   "async"     : 'false',
                   "url" 		: sSource,
                   "data" 		: {
                       'pageNum': (aoData[3].value/aoData[4].value)+1,
                       'pageSize' :  aoData[4].value,
                       'telphone'  :  $("#telphone").val(),
                       'isable' : $('#isable').val()
                   },
                   "success"	: fnCallback
               } );
           }*/
        });
    });
</script>
</body>
</html>